import React, {PureComponent} from 'react';
import {connect} from 'react-redux'
import { Link } from 'react-router-dom'

@connect(state =>({
    name: state.name
}),null)
class Home extends PureComponent {
    constructor(props){
        super(props);
        this.state = {};
    }
    btnClick() {
        alert(1111);
    }
    render(){
        return (<div>Home page {this.props.name} <br/>
                <Link to='/login'>调到登录页</Link>
            </div>);
    }
}

export default Home;